<?php

/**
 *
 * @copyright	Copyright 2009-2010   庆丰裕软件工作室
 * @author	Zheng HanWei <315933614@qq.com
 * @link	http://www.qfyu.net/
 *  
 * */
include_once("includes/global.php");
include_once("includes/smarty_config.php");
include_once("includes/news_function.php");
include_once("includes/page_utf_class.php");

$sql="select a.nid,a.classid,a.title,a.ftitle,a.titleurl,a.titlefont,a.uid,a.uptime,a.smalltext,a.writer,a.source,a.titlepic,b.cat,b.catid  from ".NEWSD." a  left join ".NEWSCAT." b on a.classid=b.catid where ispass=1 and a.classid=160 order by rand()";
$page = new Page;
$page->url=$config['weburl'];
$page->listRows=5;
if(!$page->__get('totalRows'))
{
	$db->query("SELECT count(*) as total FROM ".NEWSD." WHERE ispass=1 and classid=160");
	$page->totalRows = $db->fetchField('total');
}
$sql.= "  limit ".$page->firstRow.", ".$page->listRows;
//-----------------------
$db->query($sql);
$re["page"]=$page->prompt();
$re["list"]=$db->getRows();

$tpl->assign("re",$re);
$tpl->assign("current","expert");
include_once("footer.php");
$out=tplfetch("expert.htm",$flag);
?>
